package com.dingwen.treasure.log.feign;

import com.dingwen.treasure.base.constant.ServerConstant;
import com.dingwen.treasure.base.pojo.vo.Result;
import com.dingwen.treasure.log.feign.fallback.TreasureManageFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


/**
 * 　TreasureManageFeignClient: manage feign 客户端 </br>
 * <p> feign 调用： log -----> manage </p>
 * 　@author dingwen
 * 　@date 2022/6/19
 */
@FeignClient(name = ServerConstant.TREASURE_MANAGE, fallbackFactory = TreasureManageFeignClientFallback.class)
public interface TreasureManageFeignClient {

    /**
     * 根据用户ID获取一个用户信息： TODO 接口需要认证，目前处理暂时特殊放行
     *
     * @param userId 账户
     * @return {@link Result}
     */
    @GetMapping(value = "/sys/user/{userId}", headers = {"Keep-Original=Keep-Original"})
    Result<?> getOneByUserId(@PathVariable Long userId);


}
